<?php


namespace servers\cyf;

//环境角色类
class UseFilter
{

    private $filter;

    //传入的必须是策略接口的子类或是子类的实例
    public function __construct(Filter $filter)
    {
        $this->filter = $filter;
    }

    /**
     * 策略
     * @param $content
     * @return mixed
     */
    public function filterContent($content)
    {
        return $this->filter->content($content);
    }
}